<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户注册表单</title>
    <style>
        body {
            font-family: Arial, sans-serif;
        }
        form {
            width: 400px;
            margin: 0 auto;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        table {
            width: 100%;
            border-collapse: collapse;
        }
        td {
            padding: 8px 0;
        }
        .label-cell {
            text-align: right;
            padding-right: 10px;
            width: 30%;
        }
        input[type="text"], input[type="password"], select, textarea {
            width: 200px;
            padding: 5px;
        }
        textarea {
            height: 100px;
            resize: none;
        }
        .button-group {
            text-align: center;
            margin-top: 15px;
        }
        input[type="submit"], input[type="reset"] {
            padding: 5px 15px;
            margin: 0 10px;
        }
    </style>
</head>
<body>
    <form action="" method="post">
        <table>
            <tr>
                <td class="label-cell">姓名：</td>
                <td><input type="text" name="username" required /></td>
            </tr>
            <tr>
                <td class="label-cell">密码：</td>
                <td><input type="password" name="password" required /></td>
            </tr>
            <tr>
                <td class="label-cell">确认密码：</td>
                <td><input type="password" name="confirm_password" required /></td>
            </tr>
            <tr>
                <td class="label-cell">密码提示问题：</td>
                <td>
                    <select name="security_question" required>
                        <option value="">请选择一个问题</option>
                        <option value="1">你妈妈叫什么名字</option>
                        <option value="2">你爷爷叫什么名字</option>
                        <option value="3">你爸爸叫什么名字</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="label-cell">密码提示答案：</td>
                <td><input type="text" name="security_answer" required /></td>
            </tr>
            <tr>
                <td class="label-cell">性别：</td>
                <td>
                    <input type="radio" name="gender" value="male" id="male" required>
                    <label for="male">男</label>
                    <input type="radio" name="gender" value="female" id="female">
                    <label for="female">女</label>
                </td>
            </tr>
            <tr>
                <td class="label-cell">年龄：</td>
                <td><input type="number" name="age" min="1" max="150" required /></td>
            </tr>
            <tr>
                <td class="label-cell">籍贯：</td>
                <td>
                    <select name="province" required>
                        <option value="">请选择省/直辖市</option>
                        <option value="beijing">北京市</option>
                        <option value="shanghai">上海市</option>
                        <option value="guangdong">广东省</option>
                        <option value="jiangsu">江苏省</option>
                        <option value="zhejiang">浙江省</option>
                    </select>
                    <select name="city" required>
                        <option value="">请选择市</option>
                        <option value="beijing">北京市</option>
                        <option value="shanghai">上海市</option>
                        <option value="guangzhou">广州市</option>
                        <option value="shenzhen">深圳市</option>
                        <option value="nanjing">南京市</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="label-cell">爱好：</td>
                <td>
                    <input type="checkbox" name="hobbies[]" value="internet" id="internet">
                    <label for="internet">上网</label>
                    <input type="checkbox" name="hobbies[]" value="movies" id="movies">
                    <label for="movies">看电影</label>
                    <input type="checkbox" name="hobbies[]" value="study" id="study">
                    <label for="study">学习</label>
                </td>
            </tr>
            <tr>
                <td class="label-cell">个人介绍：</td>
                <td><textarea name="introduction" required></textarea></td>
            </tr>
            <tr>
                <td class="label-cell">上传头像：</td>
                <td>
                    <input type="file" name="avatar" accept="image/*" />
                </td>
            </tr>
        </table>
        <div class="button-group">
            <input type="submit" value="提交" />
            <input type="reset" value="重置" />
        </div>
    </form>
</body>
</html>